1. Field of the Invention
This invention relates to colour correction.
2. Description of the Prior Art
Colour correction is a technique used in the production of image or video material to replace occurrences of certain colours in original material with corresponding replacement colours. Two examples of when this process might be needed are to match the appearance of scenes shot under different lighting conditions, or simply to change the appearance of an image for artistic reasons. Particularly in the context of this second example, it will be understood that the term “correction” does not imply that there was necessarily anything intrinsically wrong with the original colour; the way that the expression “colour correction” is used in the art (and in the present application) is in fact with the more generic meaning of “colour alteration”.
The colour properties of an image are usually considered in one of the following representations, often referred to as “colour spaces”: as a set of contributions from primary colours (e.g. RGB—red, green and blue), as a luminance value (L) plus two colour difference values (e.g. Cb, Cr) or as a luminance value (L), a hue value (H) and a saturation value (S). In real images (rather than test patterns) what is perceived as a “colour” does not correspond to a single point in colour space and so cannot generally be defined as a precise, single, set of such values. Instead, what the viewer may perceive as a single “colour” would typically occupy a range of values in colour space. For example, an image of, say, a red car would have a range of “red” values depending on the local lighting, angle and even cleanliness of each area of the car. So, in order to apply colour correction to the “red” of the car, in fact a region in colour space is defined to encompass all of the “red” colour exhibited by the car. A processing operation is then applied to map that source region to another similar (target) region elsewhere in colour space. By mapping the whole region in this way, variations in shade are mapped to corresponding variations in shade at the target region.
The colour correction may thus alter one or more of the colour properties of the image. For example, hue could be altered without changing the saturation and intensity values.
Colour correction is usually carried out in the digital domain. U.S. Pat. No. 6,434,266 discloses a digital colour correction system in which each pixel value of a source image is converted from an RGB representation into an L,S,H representation. The L,S,H values are compared—pixel by pixel—with a range of L,S,H values defined as a source range of “colours to be corrected”. If a pixel is found to lie within the source range, that pixel is replaced by a pixel value in a “target” colour range.